#ifndef INDEXGENERATOR_H
#define	INDEXGENERATOR_H

#include "PageBuilder.h"
#include "Dictionary.h"
#include "Trie.h"

class IndexGenerator
{
public:
    IndexGenerator(const char* dictionaryPath);
    ~IndexGenerator();
    void generateIndex(std::ostream& out, const char* bookPath);
    void navigatePage(Page& page, Trie<Entry>& trie);
    Trie<Entry> buildTrie(std::vector<Entry>& entries);
private:
    PageBuilder pageBuilder_;
    Dictionary* dictionary_;
};

#endif	/* INDEXGENERATOR_H */

